home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 875 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  848 b 

  1. Path: bmtlh10.bnr.ca!news
  2. From: John Hickin <hickin@bnr.ca>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: warning: possibly incorrect assignment
  5. Date: 9 Jan 1996 21:14:28 GMT
  6. Organization: Bell-Northern Research
  7. Message-ID: <4culrk$71g@bmtlh10.bnr.ca>
  8. References: <Pine.OSF.3.91.960109091920.6447A-100000@io.UWinnipeg.ca>
  9. NNTP-Posting-Host: bmtlh520.bnr.ca
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.01 9000/715)
  14. X-URL: news:Pine.OSF.3.91.960109091920.6447A-100000@io.UWinnipeg.ca
  15.  
  16. |> ****        while(fp=fopen(file_name,"r"))
  17.  
  18. Rewrite it as follows:
  19.  
  20.     while ( (fp = fopen(file_name,"r")) != NULL )
  21.  
  22. and odds are that your compiler will take the hint and not warn you.
  23.  
  24. -- 
  25. John Hickin      Bell-Northern Research, Montreal, Quebec
  26. (514) 765-7924   hickin@bnr.ca
  27.  
  28.